#pragma once


#include <IXLogoButton.h>
#include "XButtonImpl.h"

template <class I>
class CXLogoButtonImpl : public CXButtonImpl<I>
{
    typedef CXButtonImpl<I> superclass;

    BEGIN_DEF_SKIN_CLASS(CXLogoButton, superclass, gs_strGuidXSkin)
        IMP_BASIC_INTF(IXLogoButton,    0)
    END_DEF_SKIN_CLASS();

    IMPL_CONTROL_OBJ(CXLogoButtonImpl, superclass, _T("LogoButton"));

public:
    CXLogoButtonImpl();
    virtual ~CXLogoButtonImpl();

public:
    // IXLogoButton
    virtual void    STDMETHODCALLTYPE   put_LogoDraw(IN IXImageDraw* pLogoDraw);
    virtual void    STDMETHODCALLTYPE   put_LogoSize(IN SIZE* sizeLogo);

public:
    // IXFrame
    virtual void    STDMETHODCALLTYPE   GetAutoSize(OUT LPSIZE pAutoSize);
    virtual void    STDMETHODCALLTYPE   Draw(XCANVAS xCanvas, const RECT& rcDraw);

public:
    // IXBaseObj
    virtual void    STDMETHODCALLTYPE   OnFinalRelease();

protected:
    // IXImage
    IXImageDraw*    m_pLogoDraw;
    SIZE            m_sizeLogo;
};


class CXLogoButton : public CXLogoButtonImpl<IXLogoButton>
{
};
